import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import { resolve } from "path"

export default defineConfig({
    plugins: [vue()],
    resolve: {
        alias: {
            "@": resolve(__dirname, "src"),
            "~": resolve(__dirname, "./"),
        },
    },
    server: {
        port: 3000,
        host: "0.0.0.0",
        proxy: {
            "/api": {
                changeOrigin: true,
                target: "http://127.0.0.1:8000",
                pathRewrite: {
                    "^/api": "/api",
                },
            },
        },
    },
    build: {
        chunkSizeWarningLimit: 2000,
    },
})
